POS Function ---------------------------------------------------------------------------- Action Returns the current horizontal position (column) of the text cursor. Syntax POS( numeric-expression) Remarks If the screen cursor is in the leftmost column, this function returns a value of 1. To return the current vertical-line position of the cursor, use the CSRLIN function. The argument numeric-expression can be any numeric expression; while it passes no information, it is required to maintain consistent BASIC function syntax. See Also CSRLIN, LPOS Example The following example uses POS to start a new line after every 40 characters. CLS ' Clear screen. PRINT "This program starts a new line after every 40" PRINT "characters you type. Press Ctrl+C to end." PRINT DO DO WHILE POS(0) < 41 ' Stay on same line until 40 characters DO ' printed. Char$ = INKEY$ LOOP WHILE Char$ = "" ' If input is key combination CTRL-C then end; otherwise, ' print the character. IF ASC(Char$) = 3 THEN END ELSE PRINT Char$; LOOP PRINT ' Print a new line. LOOP